total = 1
pTotal = 0
current = 1

L = 3
def isPrime(n):
    ns = int(n ** 0.5) + 1
    for i in xrange(2, ns):
        if n % i == 0:
            return False
    return True
while 1:
    for i in xrange(4):
        current = current + L - 1
        if isPrime(current):
            pTotal += 1
    total += 4
    p = 1.0 * pTotal / total
    if p < 0.1:
        print L
        break
    print L, current, pTotal, total, p
    L += 2



